import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';
import vueSwiper from 'vue-awesome-swiper'
import "swiper/dist/css/swiper.css";
import axios from "axios";
import VDistpicker from 'v-distpicker'

Vue.component('v-distpicker', VDistpicker)
Vue.use(Element)
Vue.use(vueSwiper)
Vue.prototype.$http = axios
Vue.prototype.$EventBus = new Vue()

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

// router.beforeEach((to,from,next) => {
//   if(to.matched.some(m => m.meta.login)){
//     if(sessionStorage.getItem('isLogin')=== '1'){
//       next()
//     }else if(to.path !== '/'){
//       next({path : '/login'})
//     }
//   }else{
//     next()
//   }
// })
